Method and system for implementing one-wire programmable circuit

ABSTRACT

The present disclosure relates to method and system of implementing one wire programmable circuit by using the same terminal OUT as both main circuit output terminal and the digital I/O interfacing terminal of the circuit. The present invention overcomes the shortcoming of prior arts and does not require the circuit to be powered down first and then powered up again each time the circuit is switched between interfacing mode (read/write/program OTP) and the normal output mode, therefore shorten the time of interfacing with the OTP as well as simplified the interfacing system used to read/write/program the OTP. The present invention also enables the possibility to put the no longer required system clock into sleeping mode after the OTP has been programmed, and has the advantages of reducing system power consumption as well as system noise due to the existing of digital clock.

TECHNICAL FIELD

The present invention relates to method and system to use the samecircuit terminal as both the circuit output terminal and the digital I/Oterminal of the circuit, thus realizing one wire programmable circuit.

BACKGROUND OF INVENTION

There is a more and more widely use of Memory, such as OTP, inintegrated circuit to control various circuit parameters. Circuits usedone wire programmable interface can be found in programmable amplifier,programmable clock, programmable potentiometer, programmable capacitor,programmable SOC, programmable integrated sensor as well as ASIC used inthe sensor calibration and temperature compensation.

SPI (4 wire) and I2C (2 wire) protocol has the advantages of fastcommunication as well as high reliability, they are widely used incommunicating with the internal memory from the outside circuit, butthey required extra circuit terminals (4 wires and 3 wires)

One wire programmable or single wire programmable protocol only adoptsone terminal (one wire) by using the same circuit terminal as both thecircuit output terminal and the digital I/O terminal the circuit uses tointerface with external circuit. The protocol therefore doesn't needextra pin to digital interface with external circuit. Using theprotocol, one wire programmable circuit can be pin to pin compatiblewith their non-programmable counterparts, and programmable circuit thatrequires only three pins, VDD, GND and Output can be realized. The onewire programming protocol is widely used in circuit designed for sensorcalibration, programmable amplifier, programmable clock, programmablepotentiometer, programmable capacitor, programmable SOC etc.

The one wire programming protocols in prior arts were realized bymonitoring the status of one wire terminal (OUT) when the circuit ispowered up. If during powered up, in at predetermined time slot, the onewire terminal (OUT) receives predetermined signals, then, the circuitgoes into interfacing mode, of which external interface circuit can Read(i.e download data from one wire programmable circuit, or Write, i.e.upload data to the one wire programmable circuit or Program, i.e. fusingthe OTP by passing high current through the OTP in the one wireprogrammable circuit). If during the predetermined time slot, nopredetermined signals are received, the circuit goes into its normaloutput mode. The circuit will not change its operation mode until it isshutdown and powered up again to decide which state to go into. Sinceswitching between the interfacing mode and the normal output mode wouldrequire the circuit to be shutdown and then powered up, the processprolongs the time needed to find the right OTP code as well asprogramming the OTP due to the fact that many times of switching betweenthe interfacing mode and the normal output mode are required in theprocess to find the right OTP code. The requirement of switching betweenthe interfacing mode and the normal output mode also makes the testsystem complicated.

SUMMARY OF PRESENT INVENTION

In view of the disadvantages of the prior arts, the objectives of thepresent invention are to provide method and system to implement one-wireprogrammable circuit that overcomes the shortcomings as discussed above.

The present invention provides a method and system of implementingone-wire programmable circuit. The one wire programmable circuitprovided in current embodiment includes main circuit module, memory(OPT) that controls the main circuit module, OTP controlling module thatcontrols the read/write/program of OTP, the one wire to multi-wireconverter that communicates with the OTP, the first analog switch S1,the second analog switch S2, and the third analog switch S3 that arecontrolled by a bit OTPL in the OTP module, the resistor R1 that isconnected in parallel with the first analog Switch S1, the system clock(OSC) that is controlled by the third analog Switch S3. One terminal ofR1 and the first analog switch S1's parallel connection is connected tothe main circuit module's terminal Vout, the other terminal of the R1and the first analog switch S1's parallel connection is connected tocircuit output terminal OUT; The one terminal of one wire to multi-wireconverter can be connected to the terminal OUT through the second analogSwitch S2 or directly to the OUT terminal. The other terminal of onewire to multi-wire converter is connected to OTP controlling module. OTPcontrolling module is connected to OTP module and through OTP module,controlling the various parameters of the main circuit.

In another preferred solution of present invention, the bit OTPL usedfor controlling the switch of the first analog switch S1, the secondanalog switch S2, and the third analog switch S3 is different from theother bits in the OTP. The OTPL output state is not affected by theread/write of OTP. The output state of OTPL bit is changed only afterthe OTPL bit is programmed, the output state of OTPL bit is used tocontrol the analog switch S1, S2, S3 and the status of OTP controlmodule.

In yet another preferred solution of the present invention, when the bitOTPL is programmed, the bit OTPL changes the first analog switch S1 fromopen to close, and make the main circuit output connected to terminalOUT through S1.

In yet another preferred solution of the present invention, the OTPcontrol module controls various programmable parameters of the circuitbefore the OTPL is programmed. After the OTPL is programmed, thoseparameters are then controlled by the OTP module. The programming(fusing) of OTP uses the OTP control module and the programming is donebit by bit.

In yet another preferred solution of the present invention, after thebit OTPL has been programmed, the status of OTPL can be used to changethe second analog switch S2 from close to open, thus, the terminal OUTwill be disconnected from the circuit modules used for interfacing tothe OTP and only connected to the main circuit module.

In yet another preferred solution of the present invention, if after theOTP is programmed, there is no need for the existence of the systemclock, the output state of OTPL can be used to change the state of thethird analog switch S3 and put the system clock into sleeping mode.

In yet another preferred solution of the present invention, there is atime delay between the moment bit OTPL is programmed and the time itoutputs its control signal to control the analog Switch S1, S2, S3 andOTP control module.

In yet another preferred solution of the present invention, the externalcircuit used to interface with the one wire programmable circuitincludes: bi-directional I/O terminal with pull up resistor which isconnected to OUT terminal through the fourth analog switch S4; When theexternal system need to read/write/program the OTP data, the switch S4is closed, the fifth analog switch S5 is open. If the external interfacecircuit needs to read the output of the main circuit, the fourth analogswitch S4 is open, the fifth analog switch S5 is closed.

The present invention also provides a procedure to read/write/programthe one-wire circuit.

Step No. 1: Connected the one wire programmable circuit with theexternal programming interface, power both system up.

Step No. 2: Open the fourth analog Switch S4, close the fifth switch S5,use measurement equipment or measurement circuit to measure the outputof main circuit module through OUT terminal. If the output at terminalOUT meets the specification, go to step No. 5; if the output of terminalOUT does not meet the specification, continue to Step No. 3.

Step No. 3: Close the fourth analog switch S4, open the fifth analog S5,external programming interface read/write OTP through terminal OUT

Step No. 4: According to the measurement results and the current data inOTP, the OTP data was set. Repeat step No. 2, No. 3 and No. 4, until thedata in the OTP which control various parameters in the one wireprogrammable circuit makes the circuit to meet its the specification,then continue to step No. 5.

Step No. 5: Close the fourth analog S4, open the fifth analog switch S5,the external programmable interface executes the programming(fusing) ofOTP, including the last bit of OTP, OTPL.

Step No. 6: Open the fourth analog switch S4, close the fifth analog S5,measurement the signal terminal OUT, verify that all the specificationsare met after the OTP has been programmed. If the specifications aremet, the circuit is OK and put into inventory. Otherwise, the circuit isrejected.

To summarize, by using the same circuit terminal (OUT) as both the maincircuit output terminal and digital I/O terminal, the system in presentinvention is one-wire programmable. The method and system in presentinvention overcomes the shortcoming of one wire programmable circuit inprior arts and doesn't require the circuit to be shutdown and powered upagain each time when changed from interfacing mode to normal outputmode, thus improving the interfacing efficiency as well as simplifyingthe test system. In the meantime, after the OTP is programmed, thepresent invention can set the system clock into sleep mode, therefore,reducing the system power consumption as well as the noise in thesystem.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is the block circuit diagram of one wire programmable circuitdescribed in present invention

FIG. 2 is the flow chart of using the one wire programmable circuitdescribed in present invention

FIG. 3 is the block circuit diagram of the one wire programmable circuitdescribed in the present invention whereas the system clock is powereddown by the close of the third analog switch S3 after the bit OPTL isprogrammed.

FIG. 4 is the block circuit diagram of the one wire programmable circuitdescribed in the present invention whereas the programmable port isdisconnected from the terminal OUT by the close of the second analogswitch S2 after the bit OPTL is programmed.

DESCRIPTION OF THE COMPONENTS IN THE DRAWINGS

-   -   1. one wire programming Integrated Circuit;    -   3: External Interface Circuit    -   11. Main circuit module;    -   12. OTP module including the last bit of OTP: OTPL    -   13. OTP controlling module;    -   14. One wire to multi wire converter    -   15. System Clock (OSC);    -   16: Circuit Output Terminal (OUT)    -   17: Resistance R1;    -   18. The first analog switch S1;    -   19: Main Circuit Output Vout;    -   20. One wire terminal of the one wire to multi wire        converter(data)    -   21. The second analog switch with inverter S2;    -   22. The third analog switch S3;    -   31. The fourth analog switch S4;    -   32. The fifth analog switch S5;    -   33. Pull up resistor R2;    -   34. Bi-directional digital Input/Output (I/O);    -   35. Measurement Equipment/Circuit with high input impedance.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

Please refer to the accompanying drawings. It should be noted that thedrawings provided in the embodiments only schematically describe thebasic ideas of the present invention, so the drawings only show thecomponents related to the present invention, but are not plottedaccording to the number, shape and size of the components in actualimplementation. The configuration, number, and proportion of thecomponents in actual implementation may be changed at will and thelayout of the components may be more complex.

The detailed implementation manners of the present invention are furtherdescribed in detail below with reference to accompanying drawings.

FIG. 1 is the block diagram of one wire programmable circuit describedin current invention, it includes the one wire programmable IntegratedCircuit (1) and external Programming Interface (3).

The one wire programmable circuit includes main circuit module (11), Onetime programmable (OTP) memory (12) that control the main circuitmodule, OTP controlling module (13) that control theread/write/programming of the OTP; One wire to multi-wire converter (14)that communicate data between terminal OUT and OPT controlling module(13); The first analog switch S1 which is controlled by the bit OTPL inOTP, Resistor R1 (17) that is connected parallel with the first analogswitch S1 (18), System Clock (OSC) (15); One terminal of the R1/S1parallel connection is connected to Main Circuit Module terminal Vout(19), the other terminal of the R1/S1 parallel connection is connectedto OUT terminal (16); the one wire terminal data (20) of the one wire tomulti-wire converter (14) is connected to OUT terminal (16), the otherterminal of the one wire to multi-wire converter is connected to the OTPcontrolling module (13); OTP controlling module (14) is connected withOTP module (12) and through the OTP control various parameters in thecircuit.

The external interface circuit 3 includes: bi-directional I/O port (34)with pull up resistor R2, the I/O port (34) is connected through thefourth analog Switch S4 (31), to OUT terminal of the one wireprogrammable circuit 1. Measurement Instrument/Measurement Circuit (35)with high input impedance is connected to OUT terminal (16) of one wireprogrammable circuit 1 through the fifth analog switch S5 (32).

As illustrated in FIG. 1, connected the one wire programmable circuitwith the external interfacing circuit, power up both systems. Forread/write the data from/to the OTP, the fourth analog switch S4 (31) isclose, the fifth analog switch S5 (32) is open, the external programmingI/O port (34) executes the program to read/write OTP data. Since OTPL isstill not programmed, the first analog switch S1 (18) is open, OUTterminal (16) is connected through R1 (17) to main circuit Vout Terminal(19). Since R2<<R1, therefore, the voltage at the terminal data (20)will not be influenced by Vout's voltage, but follow the change of thevoltage at the bi-directional I/O port (34). The one wire to multi-wireconverter (14) and the OTP controlling module (13) complete theread/write of data from the external interfacing circuit to the OTP.

When measurement of the voltage output at the main circuit module isneeded, the fourth analog switch S4 (31) is open and fifth analog switchS5 (32) is closed, the measurement instrument/Measurement Circuit (35)measure the voltage output at OUT terminal (16). Since R1<<Inputimpedance of the measurement Instrument/Circuit (35), the voltage ofterminal OUT (16) is equal to the voltage at terminal Vout (19).

FIG. 2 illustrates the flow chart of steps to find the right OTP codeand program the OTP to make the circuit met the specification. A set oftest and measurement procedure is carried out and the setting of OTP iscalculated according to the specification needed by the circuit. Afterthe right codes are found, close the fourth analog switch S4 (31) andOpen the fifth analog switch S5 (32), the external interfacing circuitexecute the program to program the OTP through one wire to multi-wiremodule (14) and OTP controlling module (13), and the calculated OTPsetting is programmed into the OTP.

After the OTP has been programmed, the last bit of the OTP, i.e. OTPL'soutput state is changed (from 0 to 1 or from 1 to 0) after certain delaytime. The change of OTPL's state changes the first analog switch S1 (18)from Open to Close, R1 (17) is short-circuit by the first analog switchS1 (18), Vout terminal (19) is connected to OUT terminal (17) by S1.Since S1 (18) has low resistance, therefore, voltage at OUT terminal(16) equal to voltage of Vout terminal (19) at the main circuit module.

Measure the output at the OUT terminal and verify that all thespecifications are met after the OTP has been programmed.

After finishing the above procedure, the calculated setting of OTP isprogrammed into the OTP. The output of OTPL bit set the circuit tooperate in normal output mode, the parameters of the circuit iscontrolled by the programmed OTP. The system in the present inventionrealize using the same terminal OUT (16) as both the output of maincircuit module and the interfacing port of the OTP, thus realizing theone wire programming system.

FIG. 3 shows another preferred solution of present invention, forsystems that do not require a system clock, such as programmableamplifier, programmable potentiometer/Capacitor, the out state of theOTPL after it is programmed can be used to change the status of thethird analog switch S3 (22) and put the system clock into sleeping mode,thus reduce the system power consumption as well as system noise due tothe digital clock.

FIG. 4, shows yet another preferred solution of the present invention,the output state of the programmed OPTL's open the second analog switchS2 (21) after go through the inverter, thus disconnects the one wire tomulti-wire module (14) from the terminal OUT (16).

It should be noted that the embodiments of the present invention aredescribed in the above through specific examples, and those withordinary skill in the art can easily understand other advantages andeffects of the present invention according to the content disclosed inthe specification. The present invention may also be implemented orapplied through other different specific examples, and variousmodifications and variations may be made to the details in thespecification on the basis of different opinions and applicationswithout departing from the principle of the present invention.

What is claimed is:
 1. A one wire programmable circuit, comprising amain circuit module, an OTP module that controls the main circuitmodule, an OTP controlling module that controls theread/write/programming of OTP, one wire to multi-wire converter whichcommunicates with the OTP controlling module, a first analog switch S1,a second analog switch S2 and a third analog switch S3 that arecontrolled by a bit OTPL in the OTP, a resistor R1 that is connected inparallel with the first analog switch S1 and a system clock that iscontrolled by the third analog switch S3; one of the terminal of theparallel connection of the resistor R1 and the first analog switch S1 isconnected to a terminal Vout of the main circuit module; the otherterminal of the parallel connection is connected to a terminal OUT; thedata terminal of the one wire to multi-wire converter can be connectedto the OUT terminal through the second analog switch S2 or connected tothe OUT terminal directly; the OPT controlling module is connected to anOTP module, and control a setting of various parameters in the circuitthrough the OTP module.
 2. The one wire programmable circuit of claim 1,wherein the bit OTPL is different from other bits in the OTP; the statusof the OTPL is not affected by the read/write of the data from/to theOTP; the output state of the OTPL is changed only after the OTPL isprogrammed (change from 1 to 0 or 0 to 1); and when programming the OTP,the bit OTPL is the last bit that is programmed; the output state ofOTPL is used to control the first analog switch S1, the second analogswitch S2 and the third analog switch S3 and the status of the OTPcontrol module.
 3. The one wire programming circuit of claim 2, whereinwhen the OTPL has been programmed, the output of OTPL changes the firstanalog switch S1 from open to close; the main circuit output Voutconnected to terminal OUT through the first analog switch S1.
 4. The onewire programmable circuit of claim 2, wherein the OTP controlling modulecontrols various parameters before OTPL is programmed; after the OTPLhas been programmed, the various parameters of the circuit arecontrolled by the output state of OTP module; the OTP is programmed bitby bit which controlled by the OTP control module.
 5. The one wireprogrammable circuit of claim 2, wherein after the OTPL has beenprogrammed, the output state of OTPL change the second analog switch S2from close to open, therefore, after the OTPL has been programmed, theterminal OUT will only be connected to main circuit module anddisconnected from those circuits used to read/write/program the OTP. 6.The one wire programmable circuit of claim 2, wherein when the systemclock (OSC) is not needed in the system after the OTP has beenprogrammed, the system clock (OSC) can be put into sleeping mode by thechanged output state of OTPL that controls the third analog switch S3.7. The one wire programmable circuit of claim 1, wherein there is a timedelay between the moment the bit OTPL finish programming and the time itoutputs its signal to control the first analog switch S1, the secondanalog switch S2 and the third analog switch S3 as well as the OTPcontrolling module.
 8. The one wire programmable circuit of claim 1,wherein the external interface circuit include a bi-direction I/O withpull up resistor, which is connected to the terminal OUT through afourth analog switch S4 and measurement equipment/circuit with highinput impedance, which is connected to terminal OUT using a fifth analogswitch S5; when external interface circuit execute program toread/write/program the OTP, the fourth analog switch S4 is closed andthe fifth analog switch S5 is open; if the output of the main circuitmodule needed to be measured, the fourth analog switch is open and thefifth analog switch S5 is closed.
 9. The one wire programmable circuitof claim 1, wherein the OTP can be replaced by EEPROM, MTP or Flash.